<%-- 
    Document   : BuchErfassenBody
    Created on : 10.04.2009, 22:26:16
    Author     : work
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html:html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        
    </head>
    <body>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <h3 align="center">Buch erfassen</h3>
        <html:form action="buchErfassen" >
            <p>
                <table align="center" border="0" width="3" cellspacing="3" cellpadding="3">
                    <tbody>
                        <tr>
                            <td><label>Titel</label></td>
                            <td align="left"><html:text property="titel"  size="60"/></td>
                        </tr>
                        <tr>
                            <td><label>Jahr</label></td>
                            <td align="left"><html:text property="jahr" size="4" /></td>
                        </tr>
                    </tbody>
                </table>
           

           <c:if test="${not empty autoren}" >
           <p align="center">
           <label>Autoren: </label>
           <table align="center" border="0" cellspacing="3" cellpadding="3">
               <thead>
                   <tr>
                       <th>Nachname</th>
                       <th>Vorname</th>
                       <th>Geburtsjahr</th>
                   </tr>
               </thead>
               <tbody>
                <c:forEach items="${autoren}" var="lauf">
                   <tr>
                       <td>${lauf.nachname}</td>
                       <td>${lauf.vorname}</td>
                       <td>${lauf.geburtsjahr}</td>
                   </tr>
               </c:forEach>
               </tbody>
           </table>
           </p>
           </c:if>

            </p>
            <p align="center">
                <html:messages id="lauf">
                    <small>
                        <span style="color: rgb(255,0,0);">
                            ${lauf}
                        </span>
                    </small><br/>
                </html:messages>
            </p>
            <p align="center">
                <html:submit property="buchButton">
                    <bean:message key="buchbutton.autorwaehlen" />
                </html:submit>
                <html:submit property="buchButton" disabled="${empty autoren}">
                    <bean:message key="buchbutton.weiter" />
                </html:submit>                
            </p>
        </html:form>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />

    </body>
</html:html>
